package com.cyj.springbootservice.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @description:
 * @Author C_Y_J
 * @create 2022/5/10 9:59
 **/
@Data
public class SysDept implements Serializable {

    private static final long serialVersionUID = -4087265209276302983L;

    @TableId(value = "dept_id", type = IdType.AUTO)
    private Integer deptId;

    /**
     * 父级部门id
     */
    private Integer parentId;

    /**
     * 祖级部门id
     */
    private String ancestors;

    /**
     * 部门名称
     */
    @NotBlank(message = "部门名称不能为空")
    private String name;

    /**
     * 排序
     */
    @NotNull(message = "排序值不能为空")
    private Integer sort;

    /**
     * 是否删除 1：已删除 0：正常
     */
    @TableLogic
    private String delFlag;
}
